<!DOCTYPE html>

<html>

<head>
    <title></title>
    <script src='../vue.js'></script>
</head>

<body>
    <div id="app-5">
        <input v-model="parentMsg">
        <br>
        <child :my-message="parentMsg"></child>
    </div>
    <script>
        // 注册
        Vue.component('child', {
            props: ['MyMessage'],
            template: '<div>{{ MyMessage }}</div>'
        })
        // 创建根实例
        new Vue({
            el: '#app-5',
            data: {
                parentMsg: "Parent Message"
            }
        })
    </script>
</body>


</html>